﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;
using System.Collections;
using System.Data.SqlClient;
using Media.Core.Helpers.Main;

namespace Media.Core.Helpers.Movies
{
    public class Movies
    {
        public static string PlayFile(int MovieId)
        {
            ArrayList paramsList = new ArrayList
            {
                new SqlParameter("Id", MovieId)
            };

            var drMovie = Data.Connections.GetDataRow("Movie_Get_FileName", paramsList);

            Process proc = new Process();
            proc.StartInfo = new ProcessStartInfo(GetDirectory.Location("Movies") + "\\" + drMovie["FileName"].ToString());
            proc.Start();

            return "File Opened";
        }
    }
}